---
title: Expo Router
description: How to use Expo Router in your app.
head:
  - tag: title
    content: Expo Router | React Native / Expo Starter
---

import CodeBlock from '../../../components/code.astro';

[expo-router](https://docs.expo.dev/router/introduction/) is a navigation library provided by Expo that simplifies the implementation of navigation in React Native applications. It is built on top of React Navigation, a widely used navigation library, and abstracts away much of the complexity involved in managing navigation state and transitions between screens.

Navigation in Expo Router is expressed declaratively, utilizing components to define the flow of the application. This approach makes it intuitive for developers to structure their navigation hierarchy.

Conventional React Native projects typically adopt a structure where a sole root component is commonly specified in either ./App.js or ./index.js. Within the context of Expo Router, an alternative approach is offered through the utilization of the Root Layout, located in `app/_layout.tsx` in our Demo. Thereby, the `_layout` section of our app handles the overall structure and navigation setup.

<CodeBlock file="src/app/_layout.tsx" />

The Demo app comes with a simple stack and tabs layout. Feel free to remove what is not working for you and add your own using the same approach as the existing ones.

Here is a simple example of the tabs layout.

<CodeBlock file="src/app/(app)/_layout.tsx" />

Make sure to check the official docs for more information and examples about [expo-router](https://docs.expo.dev/router/introduction/).
